Define __XEN_TOOLS__ when building tools. Use this to
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 27 Apr 2006 13:06:41 +0000 (14:06 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 27 Apr 2006 13:06:41 +0000 (14:06 +0100)
automatically build against latest Xen interface version,
and to specifically define GET_XEN_GUEST_HANDLE().

Signed-off-by: Keir Fraser <keir@xensource.com>
tools/Rules.mk
xen/include/public/arch-ia64.h
xen/include/public/arch-x86_32.h
xen/include/public/arch-x86_64.h
xen/include/public/xen-compat.h

index cd7793132c2d97f1320ba8abef8a57df38bf6e56..8101c0c24aa0e17aed83273112a840f4d4841f88 100644 (file)
@@ -12,7 +12,7 @@ XEN_LIBXENSTAT     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
 
 X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
 
-CFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030201
+CFLAGS += -D__XEN_TOOLS__
 
 %.opic: %.c
        $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
index a52862c80ec2c2baba66b34672c5465c4dc26a4f..358b16414de40d241eb20d48d7955af7d23163be 100644 (file)
@@ -13,7 +13,9 @@
 #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
 #define SET_XEN_GUEST_HANDLE(hnd, val)  do { (hnd).p = val; } while (0)
+#ifdef __XEN_TOOLS__
 #define GET_XEN_GUEST_HANDLE(val, hnd)  do { val = (hnd).p; } while (0)
+#endif
 
 #ifndef __ASSEMBLY__
 /* Guest handles for primitive C types. */
index dd4c8173d1190ef627a8349731e55c624795eac9..1f8b98baaa6bf2a80233576a2fee92ed67ec8745 100644 (file)
@@ -15,7 +15,9 @@
 #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
 #define SET_XEN_GUEST_HANDLE(hnd, val)  do { (hnd).p = val; } while (0)
+#ifdef __XEN_TOOLS__
 #define GET_XEN_GUEST_HANDLE(val, hnd)  do { val = (hnd).p; } while (0)
+#endif
 
 #ifndef __ASSEMBLY__
 /* Guest handles for primitive C types. */
index cb123bf3c63cb67cf010b2c61b022ff6f63346e0..1fce53bdadd627b1b0f0fdb35d426df42cc9e303 100644 (file)
@@ -15,7 +15,9 @@
 #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
 #define SET_XEN_GUEST_HANDLE(hnd, val)  do { (hnd).p = val; } while (0)
+#ifdef __XEN_TOOLS__
 #define GET_XEN_GUEST_HANDLE(val, hnd)  do { val = (hnd).p; } while (0)
+#endif
 
 #ifndef __ASSEMBLY__
 /* Guest handles for primitive C types. */
index ad8a1e1b438cfe39bc703f8e47cf0d10396b9d15..ffea28d520af8c79f7bb49f7efbbd0371f14a118 100644 (file)
@@ -11,7 +11,7 @@
 
 #define __XEN_LATEST_INTERFACE_VERSION__ 0x00030201
 
-#if defined(__XEN__)
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
 /* Xen is built with matching headers and implements the latest interface. */
 #define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__
 #elif !defined(__XEN_INTERFACE_VERSION__)